"-net nic -net user" default.
Based on a patch from: Daniel Stekloff <dsteklof@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Index: ioemu/hw/mc146818rtc.c
===================================================================
---- ioemu.orig/hw/mc146818rtc.c 2006-07-12 11:33:54.096180895 +0100
-+++ ioemu/hw/mc146818rtc.c 2006-07-12 11:35:03.205515168 +0100
+--- ioemu.orig/hw/mc146818rtc.c 2006-07-14 15:55:55.450963213 +0100
++++ ioemu/hw/mc146818rtc.c 2006-07-14 15:56:02.195195680 +0100
@@ -178,10 +178,27 @@
}
}
static void rtc_copy_date(RTCState *s)
Index: ioemu/hw/pc.c
===================================================================
---- ioemu.orig/hw/pc.c 2006-07-12 11:35:02.876556380 +0100
-+++ ioemu/hw/pc.c 2006-07-12 11:35:03.205515168 +0100
+--- ioemu.orig/hw/pc.c 2006-07-14 15:56:01.774243586 +0100
++++ ioemu/hw/pc.c 2006-07-14 15:56:02.196195566 +0100
@@ -151,7 +151,7 @@
}
QEMUMachine pc_machine = {
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-07-12 11:35:03.004540346 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:03.208514792 +0100
+--- ioemu.orig/vl.c 2006-07-14 15:56:02.010216731 +0100
++++ ioemu/vl.c 2006-07-14 15:56:02.198195338 +0100
@@ -164,6 +164,8 @@
int xc_handle;
}
}
}
-@@ -5961,7 +5969,8 @@
+@@ -5963,7 +5971,8 @@
machine->init(ram_size, vga_ram_size, boot_device,
ds, fd_filename, snapshot,
qemu_mod_timer(gui_timer, qemu_get_clock(rt_clock));
Index: ioemu/vl.h
===================================================================
---- ioemu.orig/vl.h 2006-07-12 11:35:02.881555754 +0100
-+++ ioemu/vl.h 2006-07-12 11:35:03.209514667 +0100
+--- ioemu.orig/vl.h 2006-07-14 15:56:01.779243017 +0100
++++ ioemu/vl.h 2006-07-14 15:56:02.199195224 +0100
@@ -556,7 +556,7 @@
int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
Index: ioemu/Makefile.target
===================================================================
---- ioemu.orig/Makefile.target 2006-07-12 11:35:00.382868802 +0100
-+++ ioemu/Makefile.target 2006-07-12 11:35:00.452860033 +0100
+--- ioemu.orig/Makefile.target 2006-07-14 15:50:41.320748096 +0100
++++ ioemu/Makefile.target 2006-07-14 15:55:04.753733845 +0100
@@ -285,7 +285,7 @@
endif
VL_OBJS+=tap-win32.o
Index: ioemu/configure
===================================================================
---- ioemu.orig/configure 2006-07-12 11:35:00.383868677 +0100
-+++ ioemu/configure 2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/configure 2006-07-14 15:50:41.320748096 +0100
++++ ioemu/configure 2006-07-14 15:55:04.753733845 +0100
@@ -75,8 +75,8 @@
bigendian="no"
mingw32="no"
target_user_only="yes"
Index: ioemu/cpu-all.h
===================================================================
---- ioemu.orig/cpu-all.h 2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/cpu-all.h 2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/cpu-all.h 2006-07-14 15:50:30.488983278 +0100
++++ ioemu/cpu-all.h 2006-07-14 15:55:04.544757636 +0100
@@ -690,7 +690,9 @@
void page_set_flags(target_ulong start, target_ulong end, int flags);
void page_unprotect_range(target_ulong data, target_ulong data_size);
void cpu_dump_state(CPUState *env, FILE *f,
Index: ioemu/disas.h
===================================================================
---- ioemu.orig/disas.h 2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/disas.h 2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/disas.h 2006-07-14 15:50:30.489983164 +0100
++++ ioemu/disas.h 2006-07-14 15:50:41.334746500 +0100
@@ -1,6 +1,7 @@
#ifndef _QEMU_DISAS_H
#define _QEMU_DISAS_H
#endif /* _QEMU_DISAS_H */
Index: ioemu/exec-all.h
===================================================================
---- ioemu.orig/exec-all.h 2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/exec-all.h 2006-07-12 11:35:00.454859782 +0100
+--- ioemu.orig/exec-all.h 2006-07-14 15:50:30.490983050 +0100
++++ ioemu/exec-all.h 2006-07-14 15:50:41.335746386 +0100
@@ -509,7 +509,7 @@
extern int tb_invalidated_flag;
return addr;
Index: ioemu/hw/pc.c
===================================================================
---- ioemu.orig/hw/pc.c 2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/hw/pc.c 2006-07-12 11:35:00.455859657 +0100
+--- ioemu.orig/hw/pc.c 2006-07-14 15:50:30.491982936 +0100
++++ ioemu/hw/pc.c 2006-07-14 15:55:04.543757750 +0100
@@ -65,6 +65,7 @@
return qemu_get_clock(vm_clock);
}
if (serial_hds[i]) {
Index: ioemu/hw/vga_int.h
===================================================================
---- ioemu.orig/hw/vga_int.h 2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/hw/vga_int.h 2006-07-12 11:35:00.455859657 +0100
+--- ioemu.orig/hw/vga_int.h 2006-07-14 15:50:30.491982936 +0100
++++ ioemu/hw/vga_int.h 2006-07-14 15:55:02.931941245 +0100
@@ -28,7 +28,7 @@
#define ST01_DISP_ENABLE 0x01
#define VBE_DISPI_MAX_YRES 768
Index: ioemu/monitor.c
===================================================================
---- ioemu.orig/monitor.c 2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/monitor.c 2006-07-12 11:35:00.456859532 +0100
+--- ioemu.orig/monitor.c 2006-07-14 15:50:30.493982708 +0100
++++ ioemu/monitor.c 2006-07-14 15:55:04.754733732 +0100
@@ -68,6 +68,12 @@
void term_flush(void)
{
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:00.459859156 +0100
+--- ioemu.orig/vl.c 2006-07-14 15:50:30.496982366 +0100
++++ ioemu/vl.c 2006-07-14 15:55:07.676401124 +0100
@@ -423,12 +423,15 @@
void hw_error(const char *fmt, ...)
{
/***********************************************************/
/* machine registration */
+@@ -5481,6 +5505,7 @@
+ socket_init();
+ #endif
+
++#ifndef CONFIG_DM
+ /* init network clients */
+ if (nb_net_clients == 0) {
+ /* if no clients, we use a default config */
+@@ -5490,6 +5515,7 @@
+ "user");
+ nb_net_clients = 2;
+ }
++#endif /* !CONFIG_DM */
+
+ for(i = 0;i < nb_net_clients; i++) {
+ if (net_client_init(net_clients[i]) < 0)
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-07-12 11:35:00.955797021 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:01.094779608 +0100
+--- ioemu.orig/vl.c 2006-07-14 15:55:59.491503372 +0100
++++ ioemu/vl.c 2006-07-14 15:55:59.693480386 +0100
@@ -4697,7 +4697,7 @@
"-S freeze CPU at startup (use 'c' to start execution)\n"
"-s wait gdb connection to port %d\n"
{
int mask;
CPULogItem *item;
-@@ -5698,7 +5705,7 @@
+@@ -5700,7 +5707,7 @@
stk.ss_flags = 0;
if (sigaltstack(&stk, NULL) < 0) {
Index: ioemu/vl.c
===================================================================
---- ioemu.orig/vl.c 2006-07-13 10:09:33.965343475 +0100
-+++ ioemu/vl.c 2006-07-13 10:10:11.141134364 +0100
-@@ -5972,8 +5972,10 @@
+--- ioemu.orig/vl.c 2006-07-14 15:56:03.043099185 +0100
++++ ioemu/vl.c 2006-07-14 15:56:03.123090082 +0100
+@@ -5974,8 +5974,10 @@
kernel_filename, kernel_cmdline, initrd_filename,
timeoffset);
if (use_gdbstub) {
Index: ioemu/vnc.c
===================================================================
---- ioemu.orig/vnc.c 2006-07-13 10:09:33.963343701 +0100
-+++ ioemu/vnc.c 2006-07-13 10:09:34.025336681 +0100
+--- ioemu.orig/vnc.c 2006-07-14 15:56:03.040099527 +0100
++++ ioemu/vnc.c 2006-07-14 15:56:03.124089968 +0100
@@ -3,6 +3,7 @@
*
* Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
-diff -r f36cde91babe hw/pc.c
---- a/hw/pc.c Mon Jun 26 15:16:50 2006 +0100
-+++ b/hw/pc.c Mon Jun 26 15:18:19 2006 +0100
-@@ -639,7 +639,9 @@ static void pc_init1(uint64_t ram_size,
+Index: ioemu/hw/pc.c
+===================================================================
+--- ioemu.orig/hw/pc.c 2006-07-14 15:55:59.489503600 +0100
++++ ioemu/hw/pc.c 2006-07-14 15:56:00.354405169 +0100
+@@ -639,7 +639,9 @@
}
/* allocate RAM */
/* BIOS load */
bios_offset = ram_size + vga_ram_size;
-@@ -671,8 +673,10 @@ static void pc_init1(uint64_t ram_size,
+@@ -671,8 +673,10 @@
ret = load_image(buf, phys_ram_base + vga_bios_offset);
/* setup basic memory access */
/* map the last 128KB of the BIOS in ISA space */
isa_bios_size = bios_size;
-diff -r f36cde91babe vl.c
---- a/vl.c Mon Jun 26 15:16:50 2006 +0100
-+++ b/vl.c Mon Jun 26 15:18:19 2006 +0100
-@@ -158,6 +158,8 @@ int vnc_display = -1;
- #else
+Index: ioemu/vl.c
+===================================================================
+--- ioemu.orig/vl.c 2006-07-14 15:56:00.271414614 +0100
++++ ioemu/vl.c 2006-07-14 15:56:00.358404714 +0100
+@@ -159,6 +159,8 @@
#define MAX_CPUS 1
#endif
-+
-+int xc_handle;
++int xc_handle;
++
char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
extern int domid;
-@@ -5105,6 +5107,9 @@ int main(int argc, char **argv)
+
+@@ -5105,6 +5107,9 @@
QEMUMachine *machine;
char usb_devices[MAX_VM_USB_PORTS][128];
int usb_devices_index;
char qemu_dm_logfilename[64];
-@@ -5341,11 +5346,13 @@ int main(int argc, char **argv)
+@@ -5341,11 +5346,13 @@
ram_size = atol(optarg) * 1024 * 1024;
if (ram_size <= 0)
help();
break;
case QEMU_OPTION_l:
{
-@@ -5557,6 +5564,39 @@ int main(int argc, char **argv)
+@@ -5559,6 +5566,39 @@
/* init the memory */
phys_ram_size = ram_size + vga_ram_size + bios_size;
#ifdef CONFIG_SOFTMMU
phys_ram_base = qemu_vmalloc(phys_ram_size);
if (!phys_ram_base) {
-@@ -5596,6 +5636,8 @@ int main(int argc, char **argv)
- }
+@@ -5599,6 +5639,8 @@
}
#endif
-+
-+#endif /* !CONFIG_DM */
++#endif /* !CONFIG_DM */
++
/* we always create the cdrom drive, even if no disk is there */
bdrv_init();
+ if (cdrom_index >= 0) {
socket_init();
#endif
+#ifndef CONFIG_DM
/* init network clients */
if (nb_net_clients == 0) {
/* if no clients, we use a default config */
"user");
nb_net_clients = 2;
}
+#endif /* !CONFIG_DM */
for(i = 0;i < nb_net_clients; i++) {
if (net_client_init(net_clients[i]) < 0)